//
//  TTMusicAVPlayer.h
//  TTMusic
//
//  Created by 马金晖 on 16/4/7.
//  Copyright © 2016年 cpy. All rights reserved.
//

#import <AVFoundation/AVFoundation.h>

#import "CPYSONGSModel.h"
#import "CPYDiscoveryPageSongListModel.h"
#import "CPYDiscoveryPageAuditionListModel.h"
#import "AppDelegate.h"
typedef NS_ENUM(NSUInteger, playStyle) {
    ORDERPLAY,
    REPEATONE,
    ARCPLAY,
};

@interface TTMusicAVPlayer : AVPlayer
@property (nonatomic, assign) playStyle style;
@property (nonatomic, assign) BOOL isPlay;
@property (nonatomic, assign) NSInteger local;
@property (nonatomic, strong) CPYDiscoveryPageSongListModel *songDetailModel;
@property (nonatomic, strong) CPYSONGSModel *songsModel;
@property (nonatomic, assign) BOOL isRoration;
@property (nonatomic, strong) NSTimer *timer;
@property (nonatomic, strong)AVPlayerItem *playerItem;
@property (nonatomic, strong)UIProgressView *videoProgress;
@property (nonatomic, strong)AVPlayerLayer *playerLayer;
@property (nonatomic, strong) NSString *MVURL;
@property (nonatomic, assign) BOOL isCurrent;
@property (nonatomic, assign) BOOL isCurrentSong;
typedef double NSTimeInterval;

+ (instancetype)shareTTMusicAVPlayer;

- (void)playWithURL:(CPYSONGSModel *)songListModel;




- (void)nextMusic;
/**
 *  上一曲
 */
- (void)frontMusic;

- (void)changeStyle;


-(void)playWithMVURL:(NSString *)url;

@end
